home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / mail / mailx6 / _setup.1 / OCXMAIN2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-24  |  3.6 KB  |  121 lines

  1. VERSION 4.00
  2. Begin VB.Form SessionForm 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Mail X Example Read Msg"
  5.    ClientHeight    =   4020
  6.    ClientLeft      =   1245
  7.    ClientTop       =   3330
  8.    ClientWidth     =   5490
  9.    BeginProperty Font 
  10.       name            =   "MS Sans Serif"
  11.       charset         =   0
  12.       weight          =   700
  13.       size            =   8.25
  14.       underline       =   0   'False
  15.       italic          =   0   'False
  16.       strikethrough   =   0   'False
  17.    EndProperty
  18.    Height          =   4395
  19.    Left            =   1200
  20.    LinkTopic       =   "Form2"
  21.    ScaleHeight     =   4020
  22.    ScaleWidth      =   5490
  23.    Top             =   3000
  24.    Width           =   5580
  25.    Begin VB.ListBox MsgList 
  26.       Height          =   2955
  27.       Left            =   120
  28.       TabIndex        =   2
  29.       Top             =   120
  30.       Width           =   5175
  31.    End
  32.    Begin VB.CommandButton BtnOpen 
  33.       Caption         =   "Open Msg"
  34.       Height          =   375
  35.       Left            =   3120
  36.       TabIndex        =   1
  37.       Top             =   3480
  38.       Width           =   1335
  39.    End
  40.    Begin VB.CommandButton BtnEnd 
  41.       Caption         =   "End"
  42.       Height          =   375
  43.       Left            =   1080
  44.       TabIndex        =   0
  45.       Top             =   3480
  46.       Width           =   1335
  47.    End
  48.    Begin Mailx16Lib.MSess MSess1 
  49.       Left            =   2520
  50.       Top             =   3480
  51.       _Version        =   65541
  52.       _ExtentX        =   900
  53.       _ExtentY        =   900
  54.       _StockProps     =   0
  55.    End
  56.    Begin Mailx16Lib.MMsg MMsg1 
  57.       Left            =   4920
  58.       Top             =   3480
  59.       _Version        =   65541
  60.       _ExtentX        =   900
  61.       _ExtentY        =   900
  62.       _StockProps     =   0
  63.       DisplayErrors   =   0   'False
  64.       BindString      =   "MSess1"
  65.    End
  66.    Begin Mailx16Lib.MForm MForm1 
  67.       Left            =   15
  68.       Top             =   3720
  69.       _Version        =   65541
  70.       _ExtentX        =   3413
  71.       _ExtentY        =   500
  72.       _StockProps     =   0
  73.       MXFormName      =   "FormTag1"
  74.    End
  75. Attribute VB_Name = "SessionForm"
  76. Attribute VB_Creatable = False
  77. Attribute VB_Exposed = False
  78. Private Sub BtnEnd_Click()
  79.     End
  80. End Sub
  81. Private Sub BtnOpen_Click()
  82.     Index = MsgList.ListIndex
  83.     If Index <> -1 Then
  84.         Load MsgForm
  85.         MsgForm.MMsg1.FetchMsg = Index + 1
  86.         MsgForm.szSubject = MsgForm.MMsg1.Subject
  87.         MsgForm.szNoteText = MsgForm.MMsg1.NoteText
  88.         MsgForm.szTime = MsgForm.MMsg1.TimeReceived
  89.         MsgForm.szMsgID = MsgForm.MMsg1.MsgID
  90.         MsgForm.MReci1 = MsgForm.MMsg1
  91.         MsgForm.szOriginator = MsgForm.MReci1.RecipientName
  92.         MsgForm.MFile1 = MsgForm.MMsg1
  93.         FileNum = MsgForm.MFile1.FileCount
  94.         For Index = 1 To FileNum
  95.             MsgForm.MFile1.FileNum = Index
  96.             MsgForm.szFileList.AddItem MsgForm.MFile1.filename
  97.         Next
  98.         If FileNum > 0 Then MsgForm.szFileList.ListIndex = 0
  99.         MsgForm.Show 1
  100.     Else
  101.         MsgBox "Select a Mail Message"
  102.     End If
  103. End Sub
  104. Private Sub Command2_Click()
  105. End Sub
  106. Private Sub Form_Load()
  107.     Load SystemX
  108.     SystemX.MsMail = False
  109.     SystemX.Show 1
  110.     MSess1.Logon = True
  111.     If MSess1.Logon = False Then End
  112.     MsgList.Clear
  113.     MMsg1.Action = ACTION_FINDFIRST
  114.     Do
  115.         If MMsg1.FetchMsg <> 0 Then
  116.             MsgList.AddItem MMsg1.Subject
  117.             MMsg1.Action = ACTION_FINDNEXT
  118.         End If
  119.     Loop While MMsg1.FetchMsg <> 0
  120. End Sub
  121.